/* 
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */


$(function(){
                $("#datepicker").datepicker({
                    showOn: "button",
                    buttonImage: "/images/calendar.gif",
                    buttonImageOnly: true,
                    showButtonPanel: false,
                    dateFormat: 'dd.mm.yy',
                    onSelect: function(date, object) {
                        
                        $.ajax({
                            type: "GET",
                            url: "/ajax/test.php",
                            data: "date=2011-10-26",
                            dataType: "json",
                            success: function(data, json_data){
                                console.log(data);
                                console.log(json_data);
                            }
                        });
                    }
            })
                    
                .bind("click", function(){
                    $(this).datepicker("show");   
                });
            });